<div id="fi_search_form">

	<table width="100%" align="center" cellspacing="2" cellpadding="5">
	
	<!-- TRIER PAR... -->
	<tr class="alt1">
      	<form action="index.php?d=fi&a=fi&sa=search" method="post">
        <input type="hidden" name="tri" value="10" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_3"); ?></td>
        <td> 
			<?php say("fi_tri_9a"); ?> 
          	<select name="param1" id="param12">
				<option value="id"><?php say("fi_op_id"); ?></option>
				<option value="titre"><?php say("fi_op_titre"); ?></option>
				<option value="montant"><?php say("fi_op_montant"); ?></option>
				<option value="date"><?php say("fi_op_date"); ?></option>
				<option value="ordre"><?php say("fi_op_ordre"); ?></option>
				<option value="moyen"><?php say("fi_op_moyen"); ?></option>
				<option value="objetID"><?php say("fi_op_objet"); ?></option>
            </select> 
          	<?php say("fi_tri_9b"); ?>
			<select name="param2" id="param13">
				<option value="ASC"><?php say("fi_tri_asc"); ?></option>
				<option value="DESC"><?php say("fi_tri_desc"); ?></option>
            </select>
			<?php say("fi_tri_9c"); ?>
			<select name="param3" id="param14">
				<option value="5">5</option>
				<option value="10">10</option>
				<option value="20">20</option>
				<option value="50">50</option>
				<option value="100">100</option>
				<option value="200">200</option>
				<option value="500">500</option>
				<option value="1000">1000</option>
				<option value="*" selected><?php say("fi_tri_toutes"); ?></option>
            </select>
			<?php say("fi_tri_9d"); ?>.
		</td>
        <td align="center"><input type="submit" name="submit3" id="submit2" value="<?php say("fi_trier"); ?>" /></td>
        </form>
      </tr>
	
	<!-- Depuis X jours, mois, annnées -->
      <tr class="alt2">
      	<form action="index.php?d=fi&a=fi&sa=search" method="post">
        <input type="hidden" name="tri" value="1" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_1"); ?></td>
        <td><?php say("fi_tri_1a"); ?>
			<select name="param1">
				<option value="date_facturation"><?php say("fi_op_datef"); ?></option>
				<option value="date_enregistrement"><?php say("fi_op_datee"); ?></option>
		  	</select>
			<?php say("fi_tri_1b"); ?>
			<select name="param2">
				<option value="<="><?php say("depuis"); ?></option>
				<option value=">"><?php say("avant"); ?></option>
		  	</select>&nbsp;:&nbsp;
          	<input name="param3" type="text" id="param1" size="6" maxlength="6" /><?php say("fi_tri_j"); ?>
		</td>
        <td align="center"><input type="submit" name="submit3" id="submit2" value="<?php say("fi_rechercher"); ?>" /></td>
        </form>
      </tr>

	<!-- Depuis telle date -->
      <tr class="alt1">
      <form action="index.php?d=fi&a=fi&sa=search" method="post">
      <input type="hidden" name="tri" value="2" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_1"); ?></td>
        <td>
			<?php say('fi_tri_2a'); ?>
			<select name="param1">
				<option value="date_facturation"><?php say("fi_op_datef"); ?></option>
				<option value="date_enregistrement"><?php say("fi_op_datee"); ?></option>
		  	</select>
			<?php say("fi_tri_2b"); ?> 
		  	<select name="param2">
				<option value=">"><?php say("depuis"); ?></option>
				<option value="<"><?php say("avant"); ?></option>
		  	</select>
        	<?php say("fi_tri_2c"); ?>   
			<input type="text" class="datechooser dc-dateformat='d/m/Y' dc-iconlink='lib/js/datechooser/datechooser.png' dc-weekstartday='1'  dc-onupdate='datechooser'" id="date1" name="param3" value="" size="10" maxlength="10"></td>
        <td align="center"><input type="submit" name="submit4" id="submit3" value="<?php say("fi_rechercher"); ?>" /></td>
        </form>
      </tr>

	<!-- Entre deux dates -->
      <tr class="alt2">
      <form action="index.php?d=fi&a=fi&sa=search" method="post">
      <input type="hidden" name="tri" value="3" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_1"); ?></td>
        <td><?php say("fi_tri_3a"); ?> 
			<select name="param1">
				<option value="date_facturation"><?php say("fi_op_datef"); ?></option>
				<option value="date_enregistrement"><?php say("fi_op_datee"); ?></option>
		  	</select>
			<?php say("fi_tri_3b"); ?>
          	<input type="text" class="datechooser dc-dateformat='d/m/Y' dc-iconlink='lib/js/datechooser/datechooser.png' dc-weekstartday='1'  dc-onupdate='datechooser'" id="date2" name="param2" value="" size="10" maxlength="10"> 
          	<?php say("fi_tri_3c"); ?> 
          	<input type="text" class="datechooser dc-dateformat='d/m/Y' dc-iconlink='lib/js/datechooser/datechooser.png' dc-weekstartday='1'  dc-onupdate='datechooser'" id="date3" name="param3" value="" size="10" maxlength="10"></td>
        <td align="center"><input type="submit" name="submit5" id="submit4" value="<?php say("fi_rechercher"); ?>" /></td>
        </form>
      </tr>

	<!--  Dont le montant est -->
      <tr class="alt1">
      <form action="index.php?d=fi&a=fi&sa=search" method="post">
      <input type="hidden" name="tri" value="4" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_1"); ?></td>
        <td><?php say("fi_tri_4a"); ?> 
          <select name="param1" id="param5">
            <option value=">"><?php say("fi_tri_sup"); ?></option>
            <option value="<"><?php say("fi_tri_inf"); ?></option>
          </select>
           <input name="param2" type="text" id="param6" size="10" maxlength="10" />&nbsp;--
		&nbsp;<input type="button" value="<?php say('fi_op_+'); ?>" onclick="valtoinput('0','param6'); setindex('0','param5');">
		&nbsp;<input type="button" value="<?php say('fi_op_-'); ?>" onclick="valtoinput('0','param6'); setindex('1','param5');;">
        </td>
        <td align="center"><input type="submit" name="submit6" id="submit5" value="<?php say("fi_rechercher"); ?>" /></td>
        </form>
      </tr>

	<!-- Dont l'a catégorie est -->
	<tr class="alt2">
      <form action="index.php?d=fi&a=fi&sa=search" method="post">
      <input type="hidden" name="tri" value="9" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_1"); ?></td>
        <td><?php say("fi_tri_8a"); ?>
			<select name="param1">
				<option value="="><?php say("est"); ?></option>
				<option value="!="><?php say("nest"); ?></option>
			</select>
          <select name="param2" id="param11">
              <?php
				$sql = "SELECT * FROM fi_categories;";
				$CO = new Connexion();
			 	$req = $CO->query( $sql );
				while( 	$data = $CO->fetch_assoc( $req ) )
					echo "<option value=\"".$data['id']."\">".$data['nom']."</option>";
              ?>
            </select></td>
        <td align="center"><input type="submit" name="submit7" id="submit6" value="<?php say("fi_rechercher"); ?>" /></td>
        </form>
      </tr>

	<!-- Dont le moyen de paiement est -->
      <tr class="alt1">
      <form action="index.php?d=fi&a=fi&sa=search" method="post">
      <input type="hidden" name="tri" value="5" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_1"); ?></td>
        <td><?php say("fi_tri_5a"); ?> 
			<select name="param1">
				<option value="="><?php say("est"); ?></option>
				<option value="!="><?php say("nest"); ?></option>
			</select>
          <select name="param2" id="param7">
              <?php
				$sql = "SELECT * FROM fi_moyens;";
				$CO = new Connexion();
			 	$req = $CO->query( $sql );
				while( 	$data = $CO->fetch_assoc( $req ) )
					echo "<option value=\"".$data['id']."\">".$data['moyen']."</option>";
              ?>
            </select></td>
        <td align="center"><input type="submit" name="submit7" id="submit6" value="<?php say("fi_rechercher"); ?>" /></td>
        </form>
      </tr>

	<!-- Créancier ou débiteur -->
      <tr class="alt2">
      <form action="index.php?d=fi&a=fi&sa=search" method="post">
      <input type="hidden" name="tri" value="6" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_1"); ?></td>
        <td><?php say("fi_tri_6a"); ?> 
			<select name="param1">
				<option value="="><?php say("est"); ?></option>
				<option value="!="><?php say("nest"); ?></option>
			</select>
          <input name="param2" type="text" id="param8" size="60" maxlength="255" /></td>
        <td align="center"><input type="submit" name="submit8" id="submit7" value="<?php say("fi_rechercher"); ?>" /></td>
        </form>
      </tr>

	<!-- Titre -->
      <tr class="alt1">
      <form action="index.php?d=fi&a=fi&sa=search" method="post">
      <input type="hidden" name="tri" value="7" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_1"); ?></td>
        <td><?php say("fi_tri_7a"); ?> 
			<select name="param1">
				<option value="LIKE"><?php say("contient"); ?></option>
				<option value="NOT LIKE"><?php say("ncontient"); ?></option>
			</select>
          <input name="param2" type="text" id="param9" size="60" maxlength="255" /></td>
        <td align="center"><input type="submit" name="submit9" id="submit8" value="<?php say("fi_rechercher"); ?>" /></td>
        </form>
      </tr>

	<!-- facture -->
      <tr class="alt2">
      <form action="index.php?d=fi&a=fi&sa=search" method="post">
      <input type="hidden" name="tri" value="11" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_1"); ?></td>
        <td><?php say("fi_tri_10a"); ?> 
			<select name="param1">
				<option value="!="><?php say("ont"); ?></option>
				<option value="="><?php say("nont"); ?></option>
			</select>
			<?php say("fi_tri_10b"); ?>
        <td align="center"><input type="submit" name="submit9" id="submit8" value="<?php say("fi_rechercher"); ?>" /></td>
        </form>
      </tr>

	<!-- SQL -->
      <tr class="alt1">
      <form action="index.php?d=fi&a=fi&sa=search" method="post">
      <input type="hidden" name="tri" value="8" />
        <td width="20%" align="center"><?php say("fi_tri_rechercher_2"); ?></td>
        <td><p>SELECT * FROM operations WHERE ... <br />
            <textarea name="param1" style="width:100%;" id="param10"></textarea>
        </p>
          </td>
        <td align="center"><input type="submit" name="submit10" id="submit9" value="<?php say("fi_executer"); ?>" /></td>
        </form>
      </tr>

    </table>	

</div>